package com.example.demo.zabbix.request.builder.dashboard;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/dashboard/update
 */
public class DashboardUpdateRequestBuilder extends UpdateRequestBuilder {
    private String dashboardId;
    public DashboardUpdateRequestBuilder(String auth) {
        super("dashboard.update", auth);
    }

    public DashboardUpdateRequestBuilder(Long id, String auth) {
        super("dashboard.update", id, auth);
    }
    public String getDashboardId() {
        return dashboardId;
    }

    public DashboardUpdateRequestBuilder setDashboardId(String dashboardId) {
        this.dashboardId = dashboardId;
        return this;
    }


    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("dashboardid",dashboardId);
        return baseRequest;
    }
}
